<?php
namespace app\user\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'username'  =>  'require|unique:user',
        'password' =>  'require'
    ];
    protected $message = [
        'username.require'=>'账号不能为空',
        'password.require'=>'密码不能为空',
    ];
    protected $scene = [
        'user' => ['username','password']
    ];

}